package com.icxx.learn.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * The type Config client controller.
 *
 * @author icxx
 * @version 1.0
 * @date 2019 -02-17 11:09:36
 */
@RestController
@RefreshScope
public class ConfigClientController {
    /**
     * The Name.
     */
    @Value("${dev.user.name}")
    String name;

    /**
     * The Age.
     */
    @Value("${dev.user.age}")
    String age;

    /**
     * Gets config.
     *
     * @return the config
     */
    @RequestMapping(value = "/getConfig")
    public String getConfig() {
        return "name is :" + name + " age is :" + age;
    }
}
